# -*- coding: utf-8 -*-
from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()
def init_db(app):
    db.init_app(app)

class Filedata(db.Model):
    __tablename__ = 'filedata'

    id = db.Column(db.Integer,primary_key=True,autoincrement=True)
    userid = db.Column(db.Integer)
    filename = db.Column(db.String(128))
    filehash = db.Column(db.String(128))
    fileurl = db.Column(db.String(255))
    filethumb = db.Column(db.String(128))
    size = db.Column(db.Integer)
    source = db.Column(db.Integer)
    created_at = db.Column(db.String(128))
    updated_at = db.Column(db.String(128))
